<%--
  Created by IntelliJ IDEA.
  User: kiki
  Date: 2021/5/3
  Time: 20:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.3.1.js"></script>
    <script>
        var list=new Array();
        list.push({username:"张三",age:18});
        list.push({username:"李四",age:28});
        list.push({username:"王五",age:38});
        $.ajax({
            type:"POST",
            /*请求访问地址*/
            url:"${pageContext.request.contextPath}/request5",
            /*数据*/
            data:JSON.stringify(list),
            /*编码方式*/
            contentType:"application/json;charset=utf-8"
        })
    </script>
</head>
<body>

</body>
</html>
